<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/css.css"/>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/global.css"/>
<link rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/powerFloat.css" type="text/css" />
</head>
<body>
<?php echo $this->fetch('header.html'); ?>
<div id="wrapper">
  <div id="content">
    <div id="con_le"> <?php echo $this->fetch('user_nav.html'); ?> 
    </div>
    
    <div id="con_box">
      <div class="Current"><?php echo $this->_var['position']; ?></div>
      <div class="con_top"> <?php echo $this->fetch('user_common_detail.html'); ?>
        <div class="clear"></div>
      </div>
      <div id="user_content"> <?php echo $this->fetch('message.html'); ?>
        <div id="message_action"> <a href="<?php echo $this->_var['site_url']; ?>user/message/receive_new">未读</a> <a href="<?php echo $this->_var['site_url']; ?>user/message/receive_readed" >已读</a> <a href="<?php echo $this->_var['site_url']; ?>user/message/system" >系统</a> <a href="<?php echo $this->_var['site_url']; ?>user/message/send_list">已发送</a> <a href="<?php echo $this->_var['site_url']; ?>user/message/send">发送信息</a> </div>
        <table width="100%" cellspacing="0" style="border:1px solid #ccc;" >
          <tr align="center">
            <td colspan="5" class="table_nav">标题：<?php echo $this->_var['data']['title']; ?>&nbsp;&nbsp;<?php if (! empty ( $this->_var['data']['url'] )): ?>(<a href="<?php echo $this->_var['data']['url']; ?>" target="_blank">相关链接</a>)<?php endif; ?></td>
          </tr>
          <tr >
            <th  width="15%" style="border:1px solid #ccc;">头像</th>
            <th width="20%" style="border:1px solid #ccc;">用户名</th>
            <th  style="border:1px solid #ccc;">内容</th>
          </tr>
          <tbody style="border:1px solid #ccc;">
          
          <?php $_from = $this->_var['message_children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
          <tr class="goods_div_<?php echo $this->_var['list']['id']; ?>">
            <td  style="border:1px solid #ccc;" width="10%"><img src="<?php echo $this->_var['list']['avatar_path']; ?>" width="50" height="50"/></td>
            <td style="border:1px solid #ccc;" width="20%"><?php echo $this->_var['list']['username']; ?></td>
            <td style="border:1px solid #ccc;padding:10px;" ><?php echo $this->_var['list']['content']; ?>
              <p style="text-align:right;"><?php echo Date::timeformat($this->_var['list']['add_time'],3); ?></p></td>
          </tr>
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </tbody>
       
        </table>
        <form id="myform" name="myform" action="<?php echo $this->_var['site_url']; ?>user/message/reply" method="post" style="float:left; width:700px;margin-top:20px;" enctype="MULTIPART/FORM-DATA" >
          <table cellspacing='0' cellpadding='0'>
            <tr id='tr_user'>
              <th >内容：</th>
              <td><textarea name="content" id="content" style="width:500px;height:50px;"></textarea></td>
            </tr>
            <tr class='buttons'>
              <th>&nbsp;</th>
              <td style='padding:20px 0;'><input type="hidden" name="id" value="<?php echo $this->_var['data']['id']; ?>">
                <input type="hidden" name="parent_id" value="<?php echo $this->_var['parent_arr']['parent_id']; ?>">
                <input type="hidden" name="to_user" value="<?php echo $this->_var['parent_arr']['from_user']; ?>"/>
                <input type='submit' value=' 发送 ' class='BUTTON SUBMIT'/>
                <br/>
                <br/></td>
            </tr>
          </table>
        </form>
        <div class="clear"></div>
      </div>
    </div>
    
    <div class="clear"></div>
  </div>
   
</div>
<?php echo $this->fetch('footer.html'); ?>
<?php echo $this->fetch('hidden_div.html'); ?> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery-powerFloat.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.pngfix.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/scrolltopcontrol.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/myfloat.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.validate.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/message.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/user.js"></script> 
<script>
$(function(){
	
	//发送和接受的当前状态
	$('#message_action a').each(function(){
		if($(this).attr('href') == window.location.pathname){
			  $(this).attr('class','current');
		}
	});
})

</script>
</body>
</html>
